<results>
{
let $bookdoc := doc("catalog.xml")//book
let $pubdoc := doc("addresses.xml")/publishers/publisher
for $somebook in $bookdoc, 
$somepublisher in $pubdoc
where $somebook/bookcatalog/publisher = $somepublisher/@id
return 
<result>
{<book>{$somebook/title}</book>,
$somepublisher/address[@type = "shipping"]}
</result>
}
</results>
